﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Venture.Master" AutoEventWireup="true"
    CodeBehind="Elegant.aspx.cs" Inherits="LongQuanWeb.Ventures.Elegant" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript">
        var typeid = 1;
        jQuery(document).ready(function() {
            InitPage();
            $(".Elegant_Menu .Li").click(function() {
                var ss = $(this).find("#typemenu").text();
                typeid = $.trim(ss);
                $(this).find("div").addClass("Elegant_Menu_Press").removeClass("Elegant_Menu_Normal");
                $(this).siblings().find("div").removeClass("Elegant_Menu_Press").addClass("Elegant_Menu_Normal");
                $(this).addClass("Li_Press");
                $(this).siblings().removeClass("Li_Press");
                $.ajax({
                    type: "post",
                    url: 'Elegant.aspx?page=1&typeid=' + typeid,
                    async: false,   //不能是异步提交
                    data: { zip: Math.random() },
                    global: false,
                    success: function(msg) {
                        $("#list").html($(msg).find("#list").html());
                    }
                });
            })
        });
        //绑定页码事件
        function InitPage() {
            //处理分页控件
            $("#AspNetPager1").children("a").each(function() {
                if ($(this).attr("href") != "") {
                    //获取分页按钮的超链接
                    var link = $(this).attr("href");
                    $(this).click(function() {
                        pages(link);
                    });
                }
                //让超链接不发生跳转
                $(this).attr("href", "javascript:void(0);");
            });
        }

        //重置页面内容
        function pages(link) {
            var page = link.split('?')[1].split('=')[1];
            $.ajax({
                type: "post",
                url: 'Elegant.aspx?page=' + page,
                async: false,   //不能是异步提交
                data: { zip: Math.random() },
                global: false,
                success: function(msg) {
                    $("#list").html($(msg).find("#list").html());
                }
            });
            InitPage(); //重新绑定页码事件
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <div class="menu3">
        <div class="jieshao left">
            <a class="menu-date" href="Introduction.aspx" onfocus="if(this.blur)this.blur()"><span>
            </span></a>
        </div>
        <div class="fengcai fengcai_on left">
            <a class="menu-date" href="#" onfocus="if(this.blur)this.blur()"><span></span></a>
        </div>
        <div class="peixun left">
            <a class="menu-date" href="Training.aspx" onfocus="if(this.blur)this.blur()"><span></span>
            </a>
        </div>
        <div class="zhengce left">
            <a class="menu-date" href="Policy.aspx" onfocus="if(this.blur)this.blur()"><span></span>
            </a>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="menu" class="Elegant_Menu">
        <%= HtmlStr %>
    </div>
    <div id="list">
        <div class="Elegant_Content">
            <ul>
                <asp:Repeater ID="rpt_content" runat="server">
                    <ItemTemplate>
                        <li>
                            <div class="Elegant_Item">
                                <img src="../Upload/<%# Eval("PicPath")%>" width="250px" height="180px" />
                                <a class="Elegant_Title" title="<%# Eval("ActivityName").ToString()%>" href="#">
                                    <%#LongQuanWeb.App_Code.Common.GetTitle(Eval("ActivityName").ToString().Trim(), 10)%></a>
                                <div class="Elegant_Text">
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                    <%#LongQuanWeb.App_Code.Common.GetTitle(Eval("ActivityContent").ToString(), 80)%></div>
                                <div class="Elegant_Clicks">
                                    <span>&nbsp;</span> <a href="ElegantList.aspx?id=<%# Eval("AcitivityNum").ToString().Trim()%>">
                                        查看全文</a>
                                </div>
                            </div>
                        </li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>
            <div class="clr">
            </div>
            <div style="padding-left: 55px;">
                <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="paginator" CurrentPageButtonClass="cpb"
                    CurrentPageIndex="1" EnableTheming="true" FirstPageText="首页" LastPageText="尾页"
                    NextPageText="下一页" PageSize="9" PrevPageText="上一页" ShowPageIndexBox="Never" UrlPaging="true"
                    PagingButtonType="Text" Width="100%">
                </webdiyer:AspNetPager>
            </div>
        </div>
    </div>
</asp:Content>
